package cn.lecosa.spark.test
/**
 * Created by lishas on 2016/8/22.
 */
object ApplyDemo { // 相当于是构造方法

  def apply(): Unit = {
    println("apply invoked")
  }

  def apply(name: String): String = {
    name
  }

  def apply(name: Int): Int = {
    println("Int")
    name
  }

  def main(args: Array[String]) {
//    val a = ApplyDemo() 
        val a = ApplyDemo()
    println(a)
    val arr = Array(1, 2, 3, 4, 5, 6, 7, 8, 9)
  }
}